Skip to content

Docs Issue 7455: add 'export' keyword to code snippet#7456

Merged
AmanVarshney01 merged 1 commit intoprisma:mainfrom
csrs:patch-1
Mar 10, 2026
Merged

Docs Issue 7455: add 'export' keyword to code snippet#7456
AmanVarshney01 merged 1 commit intoprisma:mainfrom
csrs:patch-1

Conversation

@csrs
Copy link
Contributor

@csrs csrs commented Jan 25, 2026

Resolves #7455

In this code snippet https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-7#after-1, the last line is missing the export keyword.

Currently:

import { PrismaClient } from './generated/prisma/client'; import { PrismaPg } from '@prisma/adapter-pg';

const adapter = new PrismaPg({ 
  connectionString: process.env.DATABASE_URL 
});
const prisma = new PrismaClient({ adapter });

Proposed change:

import { PrismaClient } from './generated/prisma/client'; import { PrismaPg } from '@prisma/adapter-pg';

const adapter = new PrismaPg({ 
  connectionString: process.env.DATABASE_URL 
});
export const prisma = new PrismaClient({ adapter });

Summary by CodeRabbit

  • Documentation
    • Updated Prisma 7 upgrade guide with corrected code examples demonstrating the recommended approach for client instantiation and configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2026

Walkthrough

This pull request corrects a code example in the Prisma 7 upgrade documentation by adding the export keyword to a PrismaClient instantiation. The change ensures the code snippet demonstrates the proper pattern for exporting the prisma instance, making it accessible to other modules as per best practices.

Changes

Cohort / File(s) Summary
Documentation Update
content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx
Added export keyword to PrismaClient instantiation in code example: const prisma = ...export const prisma = ... to match recommended pattern

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly references the issue and clearly describes the main change: adding the 'export' keyword to a code snippet in documentation.
Linked Issues check ✅ Passed The code change adds the 'export' keyword to the Prisma client instantiation, exactly matching the requirement in issue #7455 to export the prisma instance.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to the single file and modification requested in issue #7455 with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 25, 2026
@aidankmcalister
Copy link
Member

👋 Hi @csrs! Thanks for your contribution to the Prisma docs.

We wanted to let you know that we've recently updated our documentation structure and guidelines. Your PR may need to be updated to align with these changes.

Action needed:

  • Please review the latest changes on the main branch
  • Update your PR accordingly
  • Check our updated Contributing Guide for current conventions and guidelines

Resolves prisma#7455

The PostgreSQL adapter "After" code snippet was missing the `export`
keyword on the `prisma` variable, inconsistent with the SQLite example
directly below it.
@vercel
Copy link

vercel bot commented Mar 10, 2026

@AmanVarshney01 is attempting to deploy a commit to the Prisma Team on Vercel.

A member of the Team first needs to authorize it.

@AmanVarshney01
Copy link
Member

Thanks for the PR @csrs 🫡

@AmanVarshney01 AmanVarshney01 merged commit d996121 into prisma:main Mar 10, 2026
3 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Example code in "Upgrade to Prisma 7" missing "export" keyword

3 participants